// Object.getOwnPropertyDescriptors()
// value
// writable
// configurable
// enumerable

// const obj={
//     name:'imooc',
//     age:18
// }
// const desc=Object.getOwnPropertyDescriptors(obj)
// console.log(desc);

const obj={}
Reflect.defineProperty(obj,'name',{
    value:'zhouzi',//值
    writable:true,//能否重写
    configurable:true, //能否被delete删除
    enumerable:false //能否被遍历
})
Reflect.defineProperty(obj,'age',{
    value:18,
    writable:true,//能否重写
    configurable:true, //能否被delete删除
    enumerable:true //能否被遍历
})
for (const key in obj) {
   console.log(key);//age
}
console.log(Object.getOwnPropertyDescriptors(obj));
console.log(Object.getOwnPropertyDescriptor(obj,'age'));//获取对应属性的描述

